New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@unified-latex/unified-latex-util-align

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unified-latex/unified-latex-util-align

Tools for manipulating unified-latex ASTs

  • 1.8.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
524
decreased by-68.53%
Maintainers
0
Weekly downloads
 
Created
Source

unified-latex-util-align

What is this?

Functions to parse an analyze "align" environments like \begin{align}...\end{align} or \begin{bmatrix}...\end{bmatrix}.

When should I use this?

If you need to process the contents of an align environment for, e.g., pretty-printing.

Install

npm install @unified-latex/unified-latex-util-align

This package contains both esm and commonjs exports. To explicitly access the esm export, import the .js file. To explicitly access the commonjs export, import the .cjs file.

Functions

createMatchers(rowSepMacros, colSep)

function createMatchers(
  rowSepMacros: string[],
  colSep: string[]
): {
  isRowSep: Ast.TypeGuard<Ast.Macro & { content: string }>;
  isColSep: (node: Ast.Node) => boolean;
  isWhitespace: (node: Ast.Node) => node is Ast.Whitespace;
  isSameLineComment: (node: Ast.Node) => boolean;
  isOwnLineComment: (node: Ast.Node) => boolean;
};

Parameters

ParamType
rowSepMacrosstring[]
colSepstring[]

parseAlignEnvironment(ast, colSep, rowSepMacros)

Parse the content of an align environment into an array of row objects. Each row object looks like

 {
   cells: [...],
   colSeps: [...],
   rowSep: ...,
   trailingComment: ...
 }

... may be an ast node or null.

function parseAlignEnvironment(
  ast: Ast.Node[],
  colSep: string[],
  rowSepMacros: string[]
): Row[];

Parameters

ParamType
astAst.Node[]
colSepstring[]
rowSepMacrosstring[]

Keywords

FAQs

Package last updated on 21 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc